package com.acme;

public class BankApplication {
	private Bank db = new Bank();
	
	public void modifyBank(Bank bank, int clientId, double changeAmount) {
		if(changeAmount >= 0) {
			bank.getClientById(clientId).getAccount().deposit(changeAmount);
		} else {
			bank.getClientById(clientId).getAccount().withdraw(changeAmount);
		}
	}
	
	public void printBalance(Bank bank) {
		for(int i = 0; i < bank.getClientCount(); i++) {
			System.out.println("Client " + i + " balance: " + bank.getClientById(i).getAccount().getBalance());
		}
	}
	
	
	public static void main(String[] args) {
		BankApplication ba = new BankApplication();
		Client client = new Client(new SavingAccount(10), "ClientName", Gender.MALE);
		ba.db.addClient(client);
		ba.modifyBank(ba.db, 0, 30);
		ba.printBalance(ba.db);
	}
	
}
